<p>
  Write a GPU program that counts the number of elements with the integer value k in an 2D array of 32-bit integers. 
  The program should count the number of elements with k in an 2D array.
  You are given an input 2D array <code>input</code> of length <code>N x M</code> and integer <code>k</code>.
</p>

<h2>Implementation Requirements</h2>
<ul>
  <li>Use only native features (external libraries are not permitted)</li>
  <li>The <code>solve</code> function signature must remain unchanged</li>
  <li>The final result must be stored in the <code>output</code> variable</li>
</ul>

<h2>Example 1:</h2>
<pre>
Input: input [[1, 2, 3],
              [4, 5, 1]]
       k = 1
Output: output = 2
</pre>

<h2>Example 2:</h2>
<pre>
Input: input [[5, 10],
              [5, 2]]
       k = 1
Output: output = 0
</pre>

<h2>Constraints</h2>
<ul>
  <li>1 &le; <code>N, M</code> &le; 10,000</li>
  <li>1 &le; <code>input[i], k</code> &le; 100</li>
</ul>